﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="server">
   Hệ thống quản lý website
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <%--<!-- Script HightChart -->
    <script type="text/javascript" src="/Scripts/hightchart/highcharts.js"></script>
    <!-- Script HightChart -->
    <style type="text/css">
        body
        {
            background: url(/Content/Images/portal.jpg) no-repeat center center;
        }
    </style>
    <!-- Notification -->
    <script src="/Scripts/Notification/ui.notificationmsg.js" type="text/javascript"></script>
    <link href="/Scripts/Notification/notificationmsg.css" rel="stylesheet" type="text/css" />
    <!-- End Notification -->
    <link rel="stylesheet" type="text/css" href="/Content/Css/tooltip.css" />
    <script src="/Scripts/Tooltip.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function ($) {
            $(".export").click(function(){
                window.location="/Home/ExportContractList";
            });
            $('#msg1').notificationmsg({ period: 0 });
            $('#closebutton').click(function () { $('#msg1').notificationmsg('hide'); });
            showNotification();
            ShowTooltip($("a[class=showTooltip]"), $("#shareit-box"), "/Employee/EmployeeToolTip");

            $(function () {
                // Ẩn tất cả .accordion trừ accordion đầu tiên
                $("#accordion .pncontent:not(:first)").hide();
                $("#accordion .panel .pntitle").children().first().attr('class', 'pnup');
                // Áp dụng sự kiện click vào thẻ h3
                $("#accordion .pntitle").click(function () {
                    showhidePanel($(this));
                });

                $("#accordion .pncontent").each(function(){                    
                    if($.trim($(this).text())=='')
                    {                        
                        $(this).parent().remove();                 
                    }
                });
            });  
            
            
             $("#linkMoving,#linkPayroll,#linkAsset,#linkSkillset").click(function () {
                JS_LIB.msgBox('<%= Resources.Message.I0003 %>', "300");
            });

            // Hight chart
            var options = {
                chart: {
                    renderTo: 'chart-container',
                    defaultSeriesType: 'line'
                },
                title: {
                    text: 'User Login Statistic'
                },
                xAxis: {
                    categories: []
                },
                yAxis: {
                    title: {
                        text: 'Number of Users'
                    }
                },
                series: []
            };

            // Split the lines
            var cats = '<%= ViewData["LoginStatistic_Title"]  %>';
            var vals = '<%= ViewData["LoginStatistic_Value"]  %>';

            var catss = cats.split(',');
            $.each(catss, function(no, cat) {
                options.xAxis.categories.push(cat);
            });
            
            var series = {
                data: []
            };
            var valss = vals.split(',');
            series.name = "Users";
            $.each(valss, function(no, val) {
                    series.data.push(parseFloat(val));
            });            
            options.series.push(series);

             // Create the chart
             var chart = new Highcharts.Chart(options);

        });


        function showhidePanel(obj)
            {
                $accordion = obj.next();
                // Kiểm tra nếu đang ẩn thì sẽ hiện và ẩn các phần tử khác
                // Nếu đang hiện thì click vào h3 sẽ ẩn
                if ($accordion.is(':hidden') === true) {
                    $("#accordion .pncontent").slideUp();                        
                    $("#accordion .pnup").attr('class', 'pndown');
                    $accordion.slideDown();
                    obj.children().first().attr('class', 'pnup');                        
                } else {
                    $accordion.slideUp();
                    obj.children().first().attr('class', 'pndown');
                }
            }
        function showNotification() {
            var animStyle = 'slide';
            <%
                String st = "0";
                if (ViewData["NotificationList"] != null 
                || ViewData["NoticeInputAnnualHolliday"] != null
                || ViewData["NoticeUpdatePTOBalance"] != null) {st = "1";}
             %>
            if (<%Response.Write(st);%> != '0') { 
                        $('#msg1').notificationmsg({ animation: animStyle });
                        $('#msg1').notificationmsg('show');
                    }                    
         }       
    </script>--%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ModuleName" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="FunctionTitle" runat="server">
    Chào mừng bạn đến với hệ thống quản lý website thẻ giải trí
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="LoginRoles" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="MainContent" runat="server">        
</asp:Content>
